home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / pascal / pcl4p40.zip / PCL4P.PAS < prev    next >
Pascal/Delphi Source File  |  1993-10-17  |  5KB  |  177 lines

  1. unit PCL4P;
  2.  
  3. interface
  4.  
  5. const
  6.    (* COMM Ports *)
  7.    COM1 = 0;
  8.    COM2 = 1;
  9.    COM3 = 2;
  10.    COM4 = 3;
  11.    COM5 = 4;
  12.    COM6 = 5;
  13.    COM7 = 6;
  14.    COM8 = 7;
  15.    (* Baud Rate Codes *)
  16.    NORESET  = -1;
  17.    Baud300  = 0;
  18.    Baud600  = 1;
  19.    Baud1200 = 2;
  20.    Baud2400 = 3;
  21.    Baud4800 = 4;
  22.    Baud9600 = 5;
  23.    Baud19200  = 6;
  24.    Baud38400  = 7;
  25.    Baud57600  = 8;
  26.    Baud115200 = 9;
  27.    (* Parity Codes *)
  28.    NoParity  = 0;
  29.    OddParity = 1;
  30.    EvenParity= 3;
  31.    (* Stop Bit Codes *)
  32.    OneStopBit  = 0;
  33.    TwoStopBits = 1;
  34.    (* Word Length Codes *)
  35.    WordLength5 = 0;
  36.    WordLength6 = 1;
  37.    WordLength7 = 2;
  38.    WordLength8 = 3;
  39.    (* Buffer Size Codes *)
  40.    Size8    = 0;
  41.    Size16   = 1;
  42.    Size32   = 2;
  43.    Size64   = 3;
  44.    Size128  = 4;
  45.    Size256  = 5;
  46.    Size512  = 6;
  47.    Size1024 = 7;
  48.    Size2048 = 8;
  49.    Size4096 = 9;
  50.    Size8192 =  10;
  51.    Size16384 = 11;
  52.    Size32768 = 12;
  53.    Size1K = 7;
  54.    Size2K = 8;
  55.    Size4K = 9;
  56.    Size8K = 10;
  57.    Size16K = 11;
  58.    Size32K = 12;
  59.    (* Line Status Masks *)
  60.    TransBufferEmpty = $20;
  61.    BreakDetect  = $10;
  62.    FramingError = $08;
  63.    ParityError  = $04;
  64.    OverrunError = $02;
  65.    DataReady    = $01;
  66.    (* Modem Status Masks *)
  67.    DCD = $80;
  68.    RI  = $40;
  69.    DSR = $20;
  70.    CTS = $10;
  71.    DeltaDCD = $08;
  72.    DeltaRI  = $04;
  73.    DeltaDSR = $02;
  74.    DeltaCTS = $01;
  75.    (* Break Signal Commands *)
  76.    ASSERT = 'A';
  77.    CANCEL = 'C';
  78.    DETECT = 'D';
  79.    (* SioDTR & SioRTS Commands *)
  80.    SetPort = 'S';
  81.    ClrPort = 'C';
  82.    ReadPort = 'R';
  83.    (* FIFO level codes *)
  84.    LEVEL_1 =  0;
  85.    LEVEL_4 =  1;
  86.    LEVEL_8 =  2;
  87.    LEVEL_14 = 3;
  88.    (* IRQ codes *)
  89.    IRQ1  = 1;
  90.    IRQ2  = 2;
  91.    IRQ3  = 3;
  92.    IRQ4  = 4;
  93.    IRQ5  = 5;
  94.    IRQ6  = 6;
  95.    IRQ7  = 7;
  96.    (* SioInfo arguments *)
  97.    VERSION = 'V';
  98.    (* timeing constants *)
  99.    ONE_SECOND = 18;
  100.    SHORT_WAIT = 3;
  101.    LONG_WAIT = 10;
  102.  
  103. function SioBaud(Port, BaudCode : Integer) : Integer;
  104. function SioBrkKey : Boolean;
  105. function SioBrkSig(Port : Integer; Cmd : Char) : Integer;
  106. function SioCTS(Port : Integer) : Integer;
  107. function SioDCD(Port : Integer) : Integer;
  108. function SioDelay(Tics : Integer) : Integer;
  109. function SioDone(Port : Integer) : Integer;
  110. function SioDSR(Port : Integer) : Integer;
  111. function SioDTR(Port : Integer; Cmd : Char) : Integer;
  112. function SioError(Code : Integer) : Integer;
  113. function SioFIFO(Port, Code : Integer) : Integer;
  114. function SioFlow(Port, Tics : Integer) : Integer;
  115. function SioGetc(Port, Tics : Integer) : Integer;
  116. function SioInfo(Cmd : Char) : Integer;
  117. function SioIRQ(Port, IRQcode : Integer) : Integer;
  118. function SioLine(Port : Integer) : Integer;
  119. function SioLoopBack(Port : Integer) : Integer;
  120. function SioModem(Port : Integer; Mask : Char) : Integer;
  121. function SioParms(Port, ParityCode, StopBitsCode, WordLengthCode : Integer) : Integer;
  122. function SioPorts(NumberPorts, FirstPort, StatusReg : Integer) : Integer;
  123. function SioPutc(Port : Integer; Ch : Char) : Integer;
  124. function SioRead(Port, Register : Integer) : Integer;
  125. function SioReset(Port, BaudCode : Integer) : Integer;
  126. function SioRI(Port : Integer) : Integer;
  127. function SioRTS(Port : Integer; Cmd : Char ) : Integer;
  128. function SioRxBuf(Port, BufferOfs, BufferSeg, SizeCode : Integer) : Integer;
  129. function SioRxFlush(Port : Integer) : Integer;
  130. function SioRxQue(Port : Integer) : Integer;
  131. function SioTimer : LongInt;
  132. function SioTxBuf(Port, BufferOfs, BufferSeg, SizeCode : Integer) : Integer;
  133. function SioTxFlush(Port : Integer) : Integer;
  134. function SioTxQue(Port : Integer) : Integer;
  135. function SioUART(Port, Address : Integer) : Integer;
  136. function SioUnGetc(Port : Integer; Ch : Byte ) : Integer;
  137.  
  138.  
  139. implementation
  140.  
  141. {$L PCL4PLIB}
  142.  
  143. function SioBaud ; external;
  144. function SioBrkKey ; external;
  145. function SioBrkSig ; external;
  146. function SioCTS ; external;
  147. function SioDCD ; external;
  148. function SioDelay ; external;
  149. function SioDone ; external;
  150. function SioDSR ; external ;
  151. function SioDTR ; external;
  152. function SioError ; external;
  153. function SioFIFO ; external;
  154. function SioFlow ; external;
  155. function SioGetc ; external;
  156. function SioInfo ; external;
  157. function SioIRQ ; external;
  158. function SioLine ; external;
  159. function SioLoopBack ; external;
  160. function SioModem ; external;
  161. function SioParms ; external;
  162. function SioPorts ; external;
  163. function SioPutc ; external;
  164. function SioRead ; external;
  165. function SioReset ; external;
  166. function SioRI ; external;
  167. function SioRTS ; external;
  168. function SioRxBuf ; external;
  169. function SioRxFlush ; external;
  170. function SioRxQue ; external;
  171. function SioTimer ; external;
  172. function SioTxBuf ; external;
  173. function SioTxFlush ; external;
  174. function SioTxQue ; external;
  175. function SioUART ; external;
  176. function SioUnGetc ; external;
  177. end.